package ch01.demo;

public class AccessPersonConstructors {
    public static void main(String[] args) {
        //测试反射调用构造方法
        try {
            Class clz=Class.forName("ch01.demo.Person");
            Object obj=clz.newInstance();//new新建 Instance实例
            System.out.println(obj);
        }catch (ClassNotFoundException e){
            e.printStackTrace();
        }catch (SecurityException e){
            e.printStackTrace();
        }catch (IllegalArgumentException e){
            e.printStackTrace();
        }catch (InstantiationException e){
            e.printStackTrace();
        }catch (IllegalAccessException e){
            e.printStackTrace();
        }
    }
}
